package cn.itcast.bos.web.Dao.teke_delivary;

import java.util.Date;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.take_delivary.Promotion;

public interface PromotionRepository extends JpaRepository<Promotion, Integer> {

	// 定时进行活动的进行修改
	@Query("update Promotion set status='2' where endDate<? and status='1' ")
	@Modifying
	void updateStatus(Date date);

}
